// import { createStore } from 'redux'
//1.导入创建全局状态的方法 createStore

//combineReducers 是用来将多个 reducer 合并成一个reducer
import { legacy_createStore as createStore, combineReducers } from "redux";

//导入状态模块 app
import app from "./modules/app";
//导入 pro 模块
import pro from "./modules/pro";

//将两个或者多个 reducer 合并成一个 reducer
const reducer = combineReducers({
  app,
  pro,
});

//3.生成状态管理器
const store = createStore(reducer);

// 4.将 store 暴露出去
export default store;
